﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Core.Persistence.Models;
using Jayden.Dll.Web.HtmlControls;

namespace Jayden.Site.PopjesInDeZak.Dll.Edit
{
	public class ProductForm : Jayden.Dll.Web.Controls.Edit.ProductForm
	{
		protected override HtmlElement BuildPropertyElement(EntityFormModeType mode, Property property, object obj)
		{
			if (property.Name == "Image" || property.Name == "Thumbnail")
				return new Input(HtmlInputType.File, GetPropertyName(mode, property), obj == null ? null : GetStringValue(mode, property, obj)); 
			return base.BuildPropertyElement(mode, property, obj);
		}
	}
}
